package com.lex;



public class Token {
    private TokenType type;
    private String value;

    public int getStartLine() {
        return startLine;
    }

    public void setStartLine(int startLine) {
        this.startLine = startLine;
    }

    public int getEndLine() {
        return endLine;
    }

    public void setEndLine(int endLine) {
        this.endLine = endLine;
    }

    public int getStartColumn() {
        return startColumn;
    }

    public void setStartColumn(int startColumn) {
        this.startColumn = startColumn;
    }

    public int getEndColumn() {
        return endColumn;
    }

    public void setEndColumn(int endColumn) {
        this.endColumn = endColumn;
    }

    private int startLine;
    private int endLine;
    private int startColumn;
    private int endColumn;

    public void setType(TokenType type) {
        this.type = type;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    private int start;
    private int end;

    public Token(TokenType type, String value,int start,int end) {
        this.type = type;
        this.value = value;
        this.start = start;
        this.end = end;
    }


    public TokenType getType() {
        return type;
    }

    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return "\nToken{" +
                "type=" + type +
                ", value='" + value + '\'' +
                ", startLine=" + startLine +
                ", endLine=" + endLine +
                ", startColumn=" + startColumn +
                ", endColumn=" + endColumn +
                ", start=" + start +
                ", end=" + end +
                '}';
    }
}